package com.jyh.blog.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum SearchModeEnum {
    MYSQL("mysql","MySQLSearchStrategyImpl");
    public final String mode;
    public final String strategy;

    public static String getSearchMode(String mode){
        for (SearchModeEnum n : SearchModeEnum.values() ) {
            if (n.getMode().equals(mode)) {
                return n.getStrategy();
            }
        }
        return null;
    }
}
